﻿using SG.Lang.Dry.Base;
using SG.Lang.Dry.Controlling;
using SG.Lang.Dry.Mirrors;

namespace SG.Lang.Dry.Code
{
    public class Method : Element
    {
        private readonly Block _body;

        protected Method(ref ElementRecord elementRecord, ref MethodRecord methodRecord)
            : base(ref elementRecord)
        {
            _body = methodRecord.Body.ResolveExpression<Block>();
        }

        public Block Body { get { return _body; } }
    }
}
